package Demo01;
import java.util.Arrays;
public class Arrays15 {
    public static void main(String[] args) throws Exception{
       int data[] = new int[] {1,5,7,2,90,23,56,78};
       System.out.println("【原始数组内容】" + Arrays.toString(data));
       Arrays.sort(data);
       System.out.println("【排序后数组内容】" + Arrays.toString(data));
       System.out.println("【数组比较结果】" +  Arrays.equals(data,new int[] {1,2,5,7,23,56,78,90}));
       if (Arrays.binarySearch(data, 7) > 0){
           System.out.println("当前数组中包含数字7。");
       }
    }
}
